<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>年份计算</title>
    <script type="text/javascript">
        function Y(){
            var year=document.getElementById("result").value;
            if((year%10==0&&year%400==0)||(year%10!=0&&year%4==0)){
                document.write(year+"是闰年")

            }
            else{
                document.write(year+"不是闰年");
            }
        
        }
        function cf(){
            document.write("<a href='LeapYear.html' style='color:purple'>重新输入</a>")
        }
    </script>
</head>
<body>
    <div>请输入需要判断闰年的年份</div>
    <div><input type="text" id="result"><input type="button" value="计算" onclick="Y(),cf()"></div>
    
</body>
</html>